﻿package com.hutra.utils {
	import flash.events.DataEvent;
	import flash.events.EventDispatcher;
	import flash.external.ExternalInterface;
	
	/**
	 * ...
	 * @author hunglx
	 */
	public class ManagerWheel extends EventDispatcher {
		
		public function ManagerWheel() {
		}
		
		public function init(id:String) {
			try {
				ExternalInterface.call("plmain.addwheel", id);
				ExternalInterface.addCallback("plmain.addwheel", managerWheel);
			} catch (e:Error) {
			}
		}
		
		private function managerWheel(str:String):void {
			try {
				dispatchEvent(new DataEvent("MouseEvent.SCROLL_WHEEL", false, false, str));
			} catch (ex:Error) {
			}
		}
	}
}